function cdiv()
{	
	cdiv.prototype.h = 360;
	cdiv.prototype.w = 500;
	cdiv.prototype.id = 'div1';
	cdiv.prototype.bordercolor = '#99B6DB';
	cdiv.prototype.bgcolor = '#ffffff';
	cdiv.prototype.offsetX = 0;
	cdiv.prototype.offsetY = 0;
	
	cdiv.prototype.exec = function()
	{
		var hh = this.h;
		var ww = this.w;
		var cid = this.id
		var bordercolor = this.bordercolor;
		var bgcolor = this.bgcolor;
		var oX = this.offsetX;
		var oY = this.offsetY;
		
		var obj = document.getElementById(cid);
		
		if (!obj) 
		{}else
		{
			document.body.removeChild(obj);
		}

			
			var doc = document.createElement("div");
			doc.style.cssText = 'position:absolute;width:'+ww+';height:'+hh+';border:1px solid '+ bordercolor +';background-color:'+ bgcolor;
			doc.setAttribute('id',cid);
			document.body.appendChild(doc);
			var obj2 = document.getElementById(cid);
			var pos = oPos();
			var size = getSize(obj2);
			obj2.style.left = pos.x - parseInt(size.w) /2 - oX;
			obj2.style.top = pos.y - parseInt(size.h) /2 - oY;
			obj2.innerHTML = "<iframe width='99%' style='position:absolute; top:0px; z-index:-1;border-style:none' frameborder='0' border='0' id='iframe0' marginwidth='1' marginheight='1' scrolling='no' height='99%'></iframe>";
	}
	
	function getSize(obj)
	{
		var width = 0;
		var height = 0;
		width = obj.style.width;
		height = obj.style.height;
		return {w:width,h:height}
	}
	
	function oPos()
	{
		return {x: parseInt(document.body.clientWidth)/2,
		y: parseInt(document.body.clientHeight)/2}
	}	
	
}


function dialog()
{
	dialog.prototype.width = 200;
	dialog.prototype.height = 200;
	dialog.prototype.url = '';
	dialog.prototype.rv = '';

	dialog.prototype.exec = function()
	{
		var url = this.url;
		url = url.toLowerCase();
		var arr = showModalDialog(url, window, "dialogWidth:"+ this.width +"px;dialogHeight:"+ this.height +"px;help:no;scroll:no;status:no;help:no");
		this.rv = arr;
	}

}